﻿<Page
    x:Class="VisualMove.MoveListPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:VisualMove"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <Grid Background="Black">
        <Grid.RowDefinitions>
            <RowDefinition
                Height="Auto" />
            <RowDefinition
                Height="*" />
        </Grid.RowDefinitions>
        <Image
            Grid.Row="0"
            Grid.Column="1"
            Height="128"
            Source="/Assets/VisualMoveLogoLarge.png" />
        <StackPanel
            Grid.Row="0"
            Orientation="Horizontal"
            HorizontalAlignment="Right">
            <Button
                Name="AddMove"
                Height="80"
                Margin="8"
                Style="{StaticResource ButtonStyle}"
                HorizontalAlignment="Right"
                Click="AddMoveButton_Click">
                <Image
                    Source="/Assets/MovingVanIconPlus.png" />
            </Button>
            <Button
                Name="Search"
                Height="90"
                Margin="8"
                Style="{StaticResource ButtonStyle}"
                HorizontalAlignment="Right"
                Click="SearchButton_Click">
                <Image
                    Source="/Assets/MagnifyingGlass.png" />
            </Button>
        </StackPanel>
        <Button 
            Grid.Row="0"
            Grid.Column="0"
            Name="DeleteMove" 
            Height="80"
            Margin="32"
            Style="{StaticResource ButtonStyle}"
            HorizontalAlignment="Left"
            Click="DeleteMoveButton_Click">
            <Image
                Source="/Assets/TrashCanWhite.png" />
        </Button>
        <StackPanel
            VerticalAlignment="Stretch"
            Grid.Row="1"
            Grid.ColumnSpan="2">
            <Border Width="720" Opacity="0.75" Height="480" Margin="20" Padding="5" BorderThickness="5" BorderBrush="White" CornerRadius="20" Background="SkyBlue">
                <ScrollViewer
                    Width="700"
                    Height="470"
                    HorizontalScrollBarVisibility="Hidden"
                    VerticalScrollBarVisibility="Visible">
                    <ListView
                        Name="m_oMoveList" FontSize="48" SelectionChanged="m_oMoveList_SelectionChanged">
                        <ListView.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Margin="5" Orientation="Horizontal" HorizontalAlignment="Stretch">
                                    <TextBlock FontSize="28" Text="{Binding Path=Name}" HorizontalAlignment="Stretch"></TextBlock>
                                </StackPanel>
                            </DataTemplate>
                        </ListView.ItemTemplate>
                    </ListView>
                </ScrollViewer>
            </Border>
        </StackPanel>
        <Button
            Grid.Row="2"
            BorderBrush="Transparent"
            HorizontalAlignment="Center"
            VerticalAlignment="Bottom"
            Margin="0,0,0,28"
            Height="70"
            Click="ScanButton_Click">
            <Image
                Source="/Assets/ScanText.png" />
        </Button>
    </Grid>
</Page>